<?php

use think\migration\Seeder;

class CompanyIndustryMonitorSulfurDayData extends Seeder
{
    public function run()
    {
        $table = $this->table('company_industry_monitor_sulfur_day');
        //脱硫
        $rows[0] = [
            // step1:发布时间
            'publish_time'                     => date('Y-m-d', time()),

            //step2:相关ID和名称
            'industry_id'             => '1',
            'industry_name'           => '电力供热',
            'company_id'                       => '1',
            'company_name'                     => '晋能长治热电有限公司',
            'drain_id'                         => '1',
            'drain_name'                       => '1#',
            'facility_id'                      => '1',
            'facility_number'                  => '1-123456',

            //step3:运行参数
            'operation_concentration'          => mt_rand(100, 300),
            'operating_efficiency'             => mt_rand(10, 90),
            'calcium_sulfur_ratio'             => mt_rand(10, 90),
            'liquid_gas_ratio'                 => mt_rand(10, 90),

            //step4:“工况数据”中出来的前端使用字段
            'pulp_supply'                      => mt_rand(100, 300),
            'ph'                               => mt_rand(10, 90),
            'circulating_pump1_witching_state' => mt_rand(10, 90),
            'circulating_pump2_witching_state' => mt_rand(10, 90),
            'circulating_pump3_witching_state' => mt_rand(10, 90),
            'circulating_pump4_witching_state' => mt_rand(10, 90),

            //step5:“全要素”中使用的字段
            'export_smoke_dust'               => mt_rand(10, 90), //出口烟气粉尘度//361

            //step6:取出来前端不用，但需要计算用
            'inlet_gas_volume'           => mt_rand(10, 90), //硫小时出口烟气量（协议）//1

            //step7:硝的排放量（其他地方需要用）
            'emissions'               => mt_rand(10, 90), //硫的排放量=硫小时运行浓度（模型计算出来的） * 硫小时出口烟气量（协议）

            //step8:时间
            'create_time'                      => date('Y-m-d H:i:s', time()),
        ];

        $table->insert($rows)->save();
    }
}
